#ifndef BATTERY_MONITOR_H
#define BATTERY_MONITOR_H 1

#include "i2cdevice.h"

class BatteryMonitor : public I2CDevice
{
  public: 
    BatteryMonitor(int file);
    double voltage();
    double current();
    void thread_loop();
  private: 
    bool readPreviousData(char * filename);
    double readVoltage();
    double m_voltage;
    double m_current;
    double m_total_charge_drawn;
    long old_time;
    void * fh;
    void * m_thread;
    char * log_filename;
};

#endif
